Skip to content

Conversation

Noarkhh
Copy link
Contributor

@Noarkhh Noarkhh commented Sep 23, 2025

This PR includes the following:

CI workflow

The new jobs are:

  • Building a mix release of boombox server:
    • on macos with arm architecture
    • on linux with x86 architecture
  • Uploading the created releases in a github release
  • Building and uploading the python package:
    • on macos with arm architecture
    • on linux with x86 architecture using special manylinux docker image to comply with PyPI standard of compatibility between distros
  • Sending a request to readthedocs to trigger a build of the docs

Fixed and improved symlink restoring

The restored symlinks now point to correct locations. The symlinks between versioned shared objects of the same library (e.g. libvpx.dylib -> libvpx.11.dylib) are now restored too.

Downloading the elixir Boombox release

Once the Boombox class is instantiated a check is performed if the elixir release of boombox is present on the user's computer (in a default location defined with platformdirs package). If not, the release is downloaded from a github release matching the version of the python package.

@Noarkhh Noarkhh changed the title Erlang release download CI workflow for python package publishing Sep 23, 2025
@Noarkhh Noarkhh self-assigned this Sep 23, 2025
@Noarkhh Noarkhh added this to Smackore Sep 23, 2025
@Noarkhh Noarkhh moved this to In Review in Smackore Sep 23, 2025
@Noarkhh Noarkhh force-pushed the erlang-release-download branch from d905da0 to 6d29e39 Compare September 23, 2025 09:03
@Noarkhh Noarkhh requested review from mat-hek and varsill September 23, 2025 09:11
Comment on lines 232 to 254
Path.join(base_dir, "bundlex*/priv/shared/precompiled/*/lib")
|> Path.wildcard()
|> Enum.map(fn lib_dir ->
File.ls!(lib_dir)
|> Enum.group_by(&(String.split(&1, ".") |> List.first()))
|> Enum.each(fn {_lib_name, libs} ->
lib_to_symlink_to =
Enum.max_by(libs, &String.length/1)

libs
|> Enum.filter(&(&1 != lib_to_symlink_to))
|> Enum.map(fn lib_to_replace ->
lib_to_replace_path =
Path.join(lib_dir, lib_to_replace)

File.rm_rf!(lib_to_replace_path)
File.ln_s!(lib_to_symlink_to, lib_to_replace_path)
end)
end)
end)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a comment

@Noarkhh Noarkhh force-pushed the erlang-release-download branch 3 times, most recently from 92092ce to 2e5e322 Compare September 23, 2025 11:56
)

self._download_elixir_boombox_release()
release_path = os.path.join(self._data_dir, "bin", "server")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[NIT] Let's wrap that os.path.join(self._data_dir, "bin", "server") into some kind of a helper function, I think we use it in several places

download_url, filename=tarball_path, reporthook=t.update_to
)

print("Download complete. Extracting...")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would use logger from the logging module instead of print

@Noarkhh Noarkhh requested review from mat-hek and varsill September 24, 2025 09:31
Copy link
Contributor

@varsill varsill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🥇

@Noarkhh Noarkhh force-pushed the erlang-release-download branch from 0ae50c3 to 0f55603 Compare October 9, 2025 09:47
@Noarkhh Noarkhh force-pushed the erlang-release-download branch from 0f55603 to 8ffbeb9 Compare October 9, 2025 09:52
@Noarkhh Noarkhh merged commit 2fb61d9 into master Oct 9, 2025
4 checks passed
@Noarkhh Noarkhh deleted the erlang-release-download branch October 9, 2025 10:20
@github-project-automation github-project-automation bot moved this from In Review to Done in Smackore Oct 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants